package com.lframework.starter.web.config;

import com.lframework.starter.web.gen.builders.*;
import com.lframework.starter.web.gen.controller.*;
import com.lframework.starter.web.gen.converters.GenMysqlDataTypeConverter;
import com.lframework.starter.web.gen.converters.GenViewTypeConverter;
import com.lframework.starter.web.gen.impl.*;
import com.lframework.starter.web.gen.listeners.*;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;

@Configuration
@Import({
        GenController.class,
        GenCustomListCategoryController.class,
        GenCustomListController.class,
        GenCustomPageCategoryController.class,
        GenCustomPageController.class,
        GenCustomSelectorCategoryController.class,
        GenCustomSelectorController.class,
        GenDataEntityCategoryController.class,
        GenDataEntityController.class,
        GenDataObjCategoryController.class,
        GenDataObjController.class,
        GenSelectorController.class,
        GenCreateColumnConfigServiceImpl.class,
        GenCustomListCategoryServiceImpl.class,
        GenCustomListDetailServiceImpl.class,
        GenCustomListHandleColumnServiceImpl.class,
        GenCustomListQueryParamsServiceImpl.class,
        GenCustomListServiceImpl.class,
        GenCustomListToolbarServiceImpl.class,
        GenCustomPageCategoryServiceImpl.class,
        GenCustomPageServiceImpl.class,
        GenCustomSelectorCategoryServiceImpl.class,
        GenCustomSelectorServiceImpl.class,
        GenDataEntityCategoryServiceImpl.class,
        GenDataEntityDetailServiceImpl.class,
        GenDataEntityServiceImpl.class,
        GenDataObjCategoryServiceImpl.class,
        GenDataObjDetailServiceImpl.class,
        GenDataObjQueryDetailServiceImpl.class,
        GenDataObjServiceImpl.class,
        GenDetailColumnConfigServiceImpl.class,
        GenerateInfoServiceImpl.class,
        GenQueryColumnConfigServiceImpl.class,
        GenQueryParamsColumnConfigServiceImpl.class,
        GenUpdateColumnConfigServiceImpl.class,
        SimpleDBServiceImpl.class,
        SimpleTableColumnServiceImpl.class
})
public class GenAutoConfiguration {

    @Bean
    public CustomListBuilder customListBuilder() {
        return new CustomListBuilder();
    }

    @Bean
    public CustomPageBuilder customPageBuilder() {
        return new CustomPageBuilder();
    }

    @Bean
    public CustomSelectorBuilder customSelectorBuilder() {
        return new CustomSelectorBuilder();
    }

    @Bean
    public DataEntityBuilder dataEntityBuilder() {
        return new DataEntityBuilder();
    }

    @Bean
    public DataObjectBuilder dataObjectBuilder() {
        return new DataObjectBuilder();
    }

    @Bean
    public GenMysqlDataTypeConverter genMysqlDataTypeConverter() {
        return new GenMysqlDataTypeConverter();
    }

    @Bean
    public GenViewTypeConverter genViewTypeConverter() {
        return new GenViewTypeConverter();
    }

    @Bean
    public CreateColumnConfigListener.DeleteEntityDetailListener createColumnConfigDeleteEntityDetailListener() {
        return new CreateColumnConfigListener.DeleteEntityDetailListener();
    }

    @Bean
    public CreateColumnConfigListener.DeleteEntityListener deleteEntityListener() {
        return new CreateColumnConfigListener.DeleteEntityListener();
    }

    @Bean
    public DetailColumnConfigListener.DeleteEntityDetailListener detailColumnConfigDeleteEntityDetailListener() {
        return new DetailColumnConfigListener.DeleteEntityDetailListener();
    }

    @Bean
    public DetailColumnConfigListener.DeleteEntityListener detailColumnConfigDeleteEntityListener() {
        return new DetailColumnConfigListener.DeleteEntityListener();
    }

    @Bean
    public GenCustomListListener.DataEntityDetailDeleteListener genCustomListDataEntityDetailDeleteListener() {
        return new GenCustomListListener.DataEntityDetailDeleteListener();
    }

    @Bean
    public GenCustomListListener.DataObjDeleteListener genCustomListDataObjDeleteListener() {
        return new GenCustomListListener.DataObjDeleteListener();
    }

    @Bean
    public GenCustomListListener.DataObjQueryDetailDeleteListener genCustomListDataObjQueryDetailDeleteListener() {
        return new GenCustomListListener.DataObjQueryDetailDeleteListener();
    }

    @Bean
    public GenCustomSelectorListener.CustomListDeleteListener genCustomSelectorCustomListDeleteListener() {
        return new GenCustomSelectorListener.CustomListDeleteListener();
    }

    @Bean
    public GenDataObjListener.DataEntityDeleteListener genDataObjDataEntityDeleteListener() {
        return new GenDataObjListener.DataEntityDeleteListener();
    }

    @Bean
    public GenDataObjListener.DataEntityDetailDeleteListener genDataObjDataEntityDetailDeleteListener() {
        return new GenDataObjListener.DataEntityDetailDeleteListener();
    }

    @Bean
    public GenerateInfoListener.DeleteEntityListener generateInfoDeleteEntityListener() {
        return new GenerateInfoListener.DeleteEntityListener();
    }

    @Bean
    public GenTenantListener.ReloadTenantListener genTenantReloadTenantListener() {
        return new GenTenantListener.ReloadTenantListener();
    }

    @Bean
    public QueryColumnConfigListener.DeleteEntityDetailListener queryColumnConfigDeleteEntityDetailListener() {
        return new QueryColumnConfigListener.DeleteEntityDetailListener();
    }

    @Bean
    public QueryColumnConfigListener.DeleteEntityListener queryColumnConfigDeleteEntityListener() {
        return new QueryColumnConfigListener.DeleteEntityListener();
    }

    @Bean
    public QueryParamsColumnConfigListener.DeleteEntityDetailListener queryParamsColumnConfigDeleteEntityDetailListener() {
        return new QueryParamsColumnConfigListener.DeleteEntityDetailListener();
    }

    @Bean
    public QueryParamsColumnConfigListener.DeleteEntityListener queryParamsColumnConfigDeleteEntityListener() {
        return new QueryParamsColumnConfigListener.DeleteEntityListener();
    }

    @Bean
    public UpdateColumnConfigListener.DeleteEntityDetailListener updateColumnConfigDeleteEntityDetailListener() {
        return new UpdateColumnConfigListener.DeleteEntityDetailListener();
    }

    @Bean
    public UpdateColumnConfigListener.DeleteEntityListener updateColumnConfigDeleteEntityListener() {
        return new UpdateColumnConfigListener.DeleteEntityListener();
    }
}
